from app import db


class BorrowRecord(db.Model):
    __tablename__ = "borrowrecords"
    book_id = db.Column(db.BigInteger, nullable=False)
    user_id = db.Column(db.BigInteger, nullable=False)
    record_id = db.Column(db.BigInteger, primary_key=True, nullable=False)
    borrow_date = db.Column(db.DateTime, nullable=False)
    return_date = db.Column(db.DateTime, nullable=False)
    is_return = db.Column(db.Boolean, nullable=False)
    is_get = db.Column(db.Boolean, nullable=False)
    gmt_modified = db.Column(db.DateTime, nullable=False)